package com.cskaoyan.utils;

import lombok.val;

/**
 * @Author: JianhuaZeng
 * @Date: 2022/12/29 10:18
 */
public class StaticFilePath {

    /**
     * @description: 获取 resources/static的绝对路径
     * @return: java.lang.String
     * @author: JianhuaZeng
     * @date: 2022/12/29 2022/12/29
     */
    public static String getStaticPath(){
        val path = System.getProperty("user.dir")+ "/src/main/resources/static";
        return path.replace("\\","/");
    }

    /**
     *获取静态图片url
     * @param filename 图片在本地存放的名称
     * @return 访问图片的url
     */
    public static String getPicUrl(String filename){
        return "http://localhost:8083/pic/"+filename;
    }
}
